home *** CD-ROM | disk | FTP | other *** search
/ NeXT Enterprise Objects Framework 1.1 / NeXT Enterprise Objects Framework 1.1.iso / NextDeveloper / Headers / eoadaptors / Oracle7 / OracleAdaptor.h next >
Encoding:
Text File  |  1995-02-10  |  2.4 KB  |  76 lines

  1. // OracleAdaptor.h
  2. // Copyright (c) 1994, NeXT Computer, Inc.  All rights reserved.
  3.  
  4. #import <eoaccess/eoaccess.h>
  5.  
  6. @class OracleContext;
  7.  
  8. // These keys define the standard connection information for an Oracle logon.
  9. //
  10. // If there is no value for the HostMachineKey then the a connection string
  11. // of the form "userName/password@serverId" is generated.
  12. //
  13. // If all the values except the one for serverId are absent, then the
  14. // connection string will just be the value for serverId.
  15.  
  16. #define ServerIdKey @"serverId"
  17. #define HostMachineKey @"hostMachine"
  18. #define UserNameKey @"userName"
  19. #define PasswordKey @"password"
  20.  
  21. // If this key is present in the connection dictionary, the other keys are
  22. // ignored and this string is passed returned from the -oracleConnectionString
  23. // method.
  24.  
  25. #define ConnectionStringKey @"connectionString"
  26.  
  27. // If this key is present, it will be used as the setting to NLS_LANG
  28. // used to specify the language and character set for server connections.
  29. // On J systems this option defaults to japanese_japan.jeuc
  30.  
  31. #define NlsLangKey @"NLS_LANG"
  32.  
  33.  
  34. @interface OracleAdaptor:EOAdaptor
  35. {
  36.     unsigned short _connectedLogons;
  37. }
  38.  
  39. - initWithName:(NSString *)name;
  40.     // Designated initializer
  41.  
  42. - (Class)expressionClass;
  43. - (Class)adaptorContextClass;
  44. - (Class)adaptorChannelClass;
  45.     // The classes for the various pieces of the adaptor.
  46.  
  47. - createAdaptorContext;
  48.  
  49. - (NSString *)oracleConnectionString;
  50.     // This returns the user name, password, host machine, and server id as a
  51.     // string suitable to be fed to orlon().
  52.  
  53. - formatAttribute:(EOAttribute *)attribute;
  54. - formatValue:value forAttribute:(EOAttribute *)attribute;
  55. - (BOOL)isValidQualifierType:(NSString *)typeName;
  56. - (BOOL)hasValidConnectionDictionary;
  57. - (BOOL)hasOpenChannels;
  58.  
  59. - (void)oracleContextWillConnect:(OracleContext *)logon;
  60.     // This is called by an OracleContext when it will try to connect using
  61.     // the adaptor's connection information.
  62.  
  63. - (void)oracleContextDidDisconnect:(OracleContext *)logon;
  64.     // This is called by an OracleContext which has just disconnected.
  65.  
  66. - (NSArray *)connectionKeys;
  67.     // A hook to allow programs to prompt the user for a connection dictionary.
  68.  
  69. - (void)prepareEnvironmentForConnect;
  70. - (void)resetEnvironmentAfterConnect;
  71.     // These should bracket all calls to orlon() to set
  72.     // the NLS_LANG environment variable setting to the
  73.     // value specified in the model connection dictionary.
  74. @end
  75.  
  76.